package com.niit.session16.generic;

public class Phone {
	private String model;
	private double price;
	private String proterties;
//	传统的方式要打印类里面的信息，需要自己手动拼接字符串
	public void show() {
		System.out.println("型号："+model+", 价格"+price+",参数："+proterties);
	}
	
//	toString方法来自Object类
//	alt+shift+s 选择Generate toString
	@Override
	public String toString() {
		return "Phone [model=" + model + ", price=" + price + ", proterties=" + proterties + "]";
	}


	public Phone(String model, double price, String proterties) {
		super();
		this.model = model;
		this.price = price;
		this.proterties = proterties;
	}

	public Phone() {
		super();
	}

	public String getModel() {
		return model;
	}

	public void setModel(String model) {
		this.model = model;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	public String getProterties() {
		return proterties;
	}

	public void setProterties(String proterties) {
		this.proterties = proterties;
	}

}
